#!/bin/sh
currentdate=$(date +%m%d%H%M%S)
ESSID=$(iwconfig wlan1 2>/dev/null |grep -oP '(?<=ESSID:").*?(?=")'| grep ^"hotspot" | grep -oP '\d+')
cd /userdata/workdir/bag/
rosbag record --lz4 -O ${ESSID}_${currentdate}_image$1.bag /deptrum/rgb/image_raw /deptrum/depth/image_raw /run_camera_time /run_result_time /run_time /chassis/uint8_array_obs_data /tf /test_xxx_www_scan /mapping/test_grid_map /obstacle_cloud /obstacle_occupancygrid /obstacle_marker /odom /imu